import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/Login'
        },
        {
            path: '/',
            component: () => import(/* webpackChunkName: "home" */ '../components/page/view/common/Home.vue'),
            meta: { title: '自述文件' },
            children: [
                {
                    path: '/dashboard',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/Dashboard.vue'),
                    meta: { title: '系统首页' }
                },

                {
                    path: '/404',
                    component: () => import(/* webpackChunkName: "404" */ '../components/page/404.vue'),
                    meta: { title: '404' }
                },
                {
                    path: '/403',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/403.vue'),
                    meta: { title: '403' }
                },
                {
                    path: '/addWarehouse',
                    component: () => import(/* webpackChunkName: "AddWarehouse" */ '../components/page/view/AddWarehouse'),
                    meta: { title: '子仓库管理' }
                },
                {
                    path: '/warehousingManage',
                    component: () => import(/* webpackChunkName: "WarehousingManage" */ '../components/page/view/WarehousingManage'),
                    meta: { title: '入库管理' }
                },
                {
                    path: '/outInf',
                    component: () => import(/* webpackChunkName: "OutInf" */ '../components/page/view/OutInf'),
                    meta: { title: '出库管理' }
                },
                {
                    path: '/returnList',
                    component: () => import(/* webpackChunkName: "ReturnList" */ '../components/page/view/ReturnList'),
                    meta: { title: '退货管理' }
                },
                {
                    path: '/check',
                    component: () => import(/* webpackChunkName: "Check" */ '../components/page/view/Check'),
                    meta: { title: '统计报表' }
                },
                {
                    path: '/loss',
                    component: () => import(/* webpackChunkName: "Loss" */ '../components/page/view/Loss'),
                    meta: { title: '损耗管理' }
                },
                {
                    path: '/inventory',
                    component: () => import(/* webpackChunkName: "Inventory" */ '../components/page/view/Inventory'),
                    meta: { title: '开始盘点' }
                },
                {
                    path: '/supplierManage',
                    component: () => import(/* webpackChunkName: "SupplierManage" */ '../components/page/view/SupplierManage'),
                    meta: { title: '供应商管理' }
                },
                {
                    path: '/test',
                    component: () => import(/* webpackChunkName: "test" */ '../components/page/view/test'),
                    meta: { title: '测试' }
                },
                {
                    path: '/VedingMachine',
                    component: () => import('../components/page/VendingMachine'),
                    meta: { title: '售货机管理'}
                },
                {
                    path: '/Map',
                    component: () => import('../components/page/Mapp'),
                    meta: {title: '地图'}
                },
                {
                    path: '/SupplierApplication',
                    component: () => import('../components/page/SupplierApplication'),
                    meta: {title: '供应商审批'}
                },
                {
                    path: '/ReturnApproval',
                    component: () => import('../components/page/ReturnApproval'),
                    meta: {title: '退货审批'}
                },
                {
                    path: '/OperatonApplication',
                    component: () => import('../components/page/OperatonApplication'),
                    meta: {title: '运营商审批'}
                },
                {
                    path: '/LossApplication',
                    component: () => import('../components/page/LossApplication'),
                    meta: {title: '耗损审批'}
                },
                {
                    path: '/AccMangement',
                    component: () => import('../components/page/AccMangement'),
                    meta: {title: '运营商管理'}
                },
                {
                    path: '/dashboard',
                    component: () => import('../components/page/Dashboard'),
                    meta: {title: '主页'}
                },
                {
                    path: '/Role',
                    component: () => import('../components/page/Role'),
                    meta: {title: '角色管理'}
                },
                {
                    path: '/Home',
                    component: () => import('../components/page/Home'),
                    meta: {title: '后台用户管理'}
                },{
                    path: '/VmExamine',
                    component:()=> import('../components/page/VmExamine'),
                    meta: {title: '售货机管理'}
                },{
                    path: '/Order',
                    component:()=> import('../components/page/Order'),
                    meta: {title: '订单查询'}
                }
            ]
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue'),
            meta: { title: '登录' }
        },
        {
            path: '*',
            redirect: '/404'
        },

    ]
});
